{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>编辑状态</h5>
                </div>
                <div class="ibox-content layui-form">
                    <div class="layui-row layui-col-space10 layui-form-item ">

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8 form-group">
                            <label class="layui-form-label">用户状态：</label>
                            <div class="layui-input-block">
                                <input type="radio" name="user_status" value="1" {$user.user_status==1?'checked':''} class="layui-input" title="启用"/>
                                <input type="radio" name="user_status" value="2" {$user.user_status==2?'checked':''} class="layui-input"  title="冻结"/>
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">备注：</label>
                            <div class="layui-input-block">
                                <input type="text" name="remark1" placeholder="备注" class="layui-input">
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8 form-group">
                            <label class="layui-form-label">团队长状态：</label>
                            <div class="layui-input-block">
                                <input type="radio" name="teamer_status" value="1" {$user.user_teamer_status==1?'checked':''} class="layui-input" title="启用"/>
                                <input type="radio" name="teamer_status" value="2" {$user.user_teamer_status==2?'checked':''} class="layui-input"  title="冻结"/>
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">备注：</label>
                            <div class="layui-input-block">
                                <input type="text" name="remark2" placeholder="备注" class="layui-input">
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8 form-group">
                            <label class="layui-form-label">省代状态：</label>
                            <div class="layui-input-block">
                                <input type="radio" name="sheng_status" value="1" {$user.user_agency_sheng_status==1?'checked':''} class="layui-input" title="启用"/>
                                <input type="radio" name="sheng_status" value="2" {$user.user_agency_sheng_status==2?'checked':''} class="layui-input"  title="冻结"/>
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">备注：</label>
                            <div class="layui-input-block">
                                <input type="text" name="remark3" placeholder="备注" class="layui-input">
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8 form-group">
                            <label class="layui-form-label">市代状态：</label>
                            <div class="layui-input-block">
                                <input type="radio" name="shi_status" value="1" {$user.user_agency_shi_status==1?'checked':''} class="layui-input" title="启用"/>
                                <input type="radio" name="shi_status" value="2" {$user.user_agency_shi_status==2?'checked':''} class="layui-input"  title="冻结"/>
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">备注：</label>
                            <div class="layui-input-block">
                                <input type="text" name="remark4" placeholder="备注" class="layui-input">
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8 form-group">
                            <label class="layui-form-label">县代状态：</label>
                            <div class="layui-input-block">
                                <input type="radio" name="qu_status" value="1" {$user.user_agency_qu_status==1?'checked':''} class="layui-input" title="启用"/>
                                <input type="radio" name="qu_status" value="2" {$user.user_agency_qu_status==2?'checked':''} class="layui-input"  title="冻结"/>
                            </div>
                        </div>

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">备注：</label>
                            <div class="layui-input-block">
                                <input type="text" name="remark5" placeholder="备注" class="layui-input">
                            </div>
                        </div>

                        <input type="hidden" value="{$user_id}" name="user_id">

                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit="" lay-filter="component-form-element">保存
                                </button>
                                <!--<button class="layui-btn layui-btn-primary" onclick="history.go(-1)">关闭</button>-->
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}

<script>
    layui.use(['form','upload','layedit'], function() {
        var form = layui.form;
        form.on('submit(component-form-element)', function (data) {
            // $('.layui-btn').addClass('layui-disabled').attr('disabled','disabled');
            $.ajax({
                url:"{:url('userStatus')}",
                type:'post',
                dataType:'json',
                data:data.field,
                success:function(res){
                    if (res.code == 200) {
                        layer.msg(res.msg,{icon:1,time:1500,shade:0.1},function(index){
                            wk.layer_close();
                        })
                    } else {
                        wk.error(res.msg,'','$(".layui-btn").removeClass(\'layui-disabled\').removeAttr(\'disabled\');');
                    }
                }
            })
        });
    });
</script>

</body>
</html>
